Many consumer electronics products include at least one camera. These products include tablet computers, mobile phones, and smart watches. In such products, and in digital still cameras themselves, high-dynamic range (HDR) functionality enables imaging of scenes having an increased dynamic range of luminosity. The cameras include an image sensor having many pixels arranged as a pixel array. One way to capture an HDR image is for the image sensor to have a spatially-varying exposure level across the pixel array when the camera captures the image.